<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <title>魏远商城</title>
    <link rel="stylesheet" type="text/css" href="../../css/common/public.css" />
    <link rel="stylesheet" type="text/css" href="../../css/home/classifi.css" />
    <link rel="stylesheet" type="text/css" href="../../assets/swiper-3.4.2.min.css"/>
    <!--<link rel="stylesheet" type="text/css" href="../../css/common/public.css" />-->   
    <script src="../../assets/swiper-3.4.2.min.js"></script>
    <script src="../../assets/jquery-3.1.1.min.js"></script>
    <!--<script src="../../js/public.js"></script>-->
</head>
<body>
	<div class="top_all">
		<div class="top">
			<div class="top_con">
				<div class="tlogin"></div>
				<div class="gotoregister" style="display: none;">免费注册</div>
				<div class="homepage">商城首页</div>
				<div class="tmyorder">我的订单<img src="../../image/turn_down.png"></div>						
				<div class="home_car"><img src="../../image/shop_car.png">购物车<span class="car_time">0</span></div>
				<div class="line_ke">联系客服<img src="../../image/turn_down.png"></div>							
			</div>		
		</div>
		<div class="loged" style="display: none;">
			<div><span class="guanli">账号管理</span>|<span class="out">退出</span></div>
			<div class="thead">
				<div class="thead_pic"><span></span></div>
				<div class="tmenber">企业会员</div>
			</div>
		</div>
		<div class="myorder">
			<span class="order_1">待支付</span>
			<span class="order_2">待发货</span>
			<span class="order_3">待收货</span>
			<span class="order_4">待评价</span>
		</div>
		<div class="tcont">
			<span class="mine1">用户帮助</span>
			<span class="mine2">联系客服</span>
			<span class="mine3">投诉建议</span>
			<span class="mine4">退换货</span>
			<span class="mine5">收货地址管理</span>
		</div>
		
		<div class="logeandsear">
			<div class="imageLogo"><img src="../../image/Logo.png"></div>
			<div class="search">
				<div>
					<img class="search-icon" src="../../image/search-icon.png"><input type="text" class="home_searchto" placeholder="魏远产品搜索" /><span class="gotosearch">搜索</span>
				</div>
			</div>
	    </div>
	</div>	
	<div class="right">
			<div class="right_car"><span><img src="../../image/righr_car.png"></br>购</br>物</br>车</span></div>
		<div class="youhuiquan"><span>优</br>惠</br>券</span></div>
		<div class="qianbao"><span>钱</br>包</span></div>
		<div class="qiyeshangc"><span>企</br>业</br>商</br>城</span></div>
		<div class="totop"><span><br/>^<br/>TOP</span></div>
	</div>
	
	<div class="wrap">
		<div class="select">
			<div>
				<span class="alltype" style="background-color: white;">全部商品分类</span>
				<span  class="home_hot">热销爆款</span>
				<span class="home_new">新品速递</span>
				<span class="home_acv">营销活动</span>
				<span class="home_topg">优品馆</span>
				<!--李勇-->
					<div class="downtypeg" style="display: none;">
						<div class="downtypegdivall">
							<div class="downtypegdiv"></div>						
							<div class="downcatediv" style="display: none;"></div>						
						</div>
				    </div>
					<!--李勇结束-->
				<!--<div class="downtypeg"  style="display: none;">
					
				</div>-->
			</div>
		</div>
		<div class="classifi">
			<!--<p class="classifi_p"></p>-->
			<!--<div class="c_search">
				<span>价格：<input value="100" class="search_f"/>—<input class="search_t"/></span>
				<span>名称：<input class="searchfor" placeholder="请输入您要查找的名称"></span>
			</div>-->
		</div>
		<div class="clas_con">
			
		</div>	
		
	
		
		
	</div>
    <div class="wrap">
		<div class="wrap_bottom"><img src="../../image/bottom.png"></div>
	</div>
<script type="text/javascript" src="../../js/url.js"></script>
<script>
	  
//	   var wid = Number($('.alltype').css('width').substr(0,2))+60;
//	$('.downtypeg').css('width',wid+'px');
	  
	$('.downtypeg').css('height','500px');
	$('.clas_con').on('click','.clas_con_dan', function() {
		localStorage.wyshopwhatclass = '';		
		localStorage.wyshopwhatclass1 = '';
        whereto($(this).attr('id'));
	});
	
    function whereto(wid){
    	localStorage.wyshopwheredetails = wid;
    	window.location.href='../goods/detalis.html';
    };


	/*图片放大特效*/
	 $('.firegoods-con').on('mouseover','.firegoods-dan',function(){
	 	
	 	  $(this).find('.goodspic').css({"transform": "scale(1.05, 1.05)","transition": ".3s transform","box-shadow": "0 0 10px 1px #EAAF27, 0 0 10px 1px #EAAF27, 0 0 10px 1px #EAAF27, 0 0 10px 1px #EAAF27"})
	 });
	
	$('.firegoods-con').on('mouseout','.firegoods-dan',function(){
	 	  $(this).find('.goodspic').css({"transform": "scale(1, 1)","box-shadow":"none"})
	});


  
                   erji();
				function erji() {
//					$('.classifi_p').text(localStorage.wyshopwhatsearch);
					$.ajax({
						url: ur + '/mobile/product/searchShop',
						type: 'post',
						dataType: 'json',
						data: {
							"parameter": localStorage.wyshopwhatsearch,
						},
						success: function(data) {
							//							console.log(data);
							//							console.log(JSON.stringify(data) + '加载二丶三级分类背景')
							//						console.log(data.result.data[0].mainImg+'打印图片...')
							 if(data.result.data.product.length>0){
								var n = data.result.data.product.length;

								for(var i = 0; i < n; i++) {
									var b = data.result.data.product[i].mainImg;
//									console.log(b.indexOf(',') + '逗号索引值');
									var m = b.indexOf(',');
									if(m != '-1') {
										var mainImg = b.substring(0, m);
									} else {
										mainImg = b;
									}
									var div = $('<div class="clas_con_dan" id="' + data.result.data.product[i].id + '">'+
													'<div class="clas_content">'+
														'<div class="con_danpic" style="background-image: url(' + picur + mainImg + ');background-position: center;background-repeat: no-repeat;background-size: cover;">'+
															
														'</div>'+
														'<p>' + data.result.data.product[i].shortname + '</p>'+
														'<p>￥<span>' + data.result.data.product[i].price + '</span></p>'+
													'</div>'+
													'<div class="c_shadow">'+
														'<span></span>'+
														'<span></span>'+
													'</div>'+
												'</div>');
									
									
									

									$('.clas_con').append(div);
								}
							}

						},
						error: function() {

						}
					});
				};
			






</script>
</body>
</html>
